export const checkeSort=(rule, value, callback)=>{
  if (value==0) {
    return callback(new Error('请输入非0的数字'))
  }
  callback()
}
export const checkeSort2=(rule, value, callback)=>{
  if (value==0) {
    return callback(new Error('请输入非0的数字'))
  }
  callback()
}
export const tableOption ={
    labelPosition: 'right',
    labelSuffix: ':',
    labelWidth: 130,
    indexWidth: 60,
    gutter: 0,
    menuBtn: true,
    submitBtn: true,
    submitText: '提交',
    emptyBtn: true,
    emptyText: '清空',
    menuPosition: 'center',
    border: true,
    index: true,
    indexLabel: '序号',
    stripe: true,
    menuAlign: 'center',
    align: 'center',
    searchMenuSpan: 6,
    addBtn: false,
    searchMenuPosition: 'left',
    searchLabelWidth: 'auto',
    column: [
        {
          type: 'input',
          label: '楼层主键ID',
          prop: 'floorId',
          addDisplay: true,
          editDisabled: true,
          hide: true,
          display:false
        },
        {
          type: 'select',
          label: '楼层所属建筑',
          // searchLabelWidth: 150,
          search: true,
          prop: 'floorPid',
          formslot: true,
          
          slot: true,
          hide: true,
          rules: [{
            required: true,
            message: '楼层所属建筑不能为空',
            trigger: 'blur'
          }]
        },
        {
          type: 'input',
          label: '楼层所属建筑名称',
          overHidden: true,
          prop: 'buildingsName',
          addDisplay: false,
          editDisplay: false
        },
        {
          type: 'input',
          label: '楼层编码',
          prop: 'floorCode',
          overHidden: true,
          formslot: true,
          slot: true,
          disabled:true
        },
     
        {
          type: 'input',
          label: '楼层中文名',
          prop: 'floorCn',
          addDisplay: true,
          editDisabled: false,
          search: true,
          // searchLabelWidth: 110,
          rules: [{
            required: true,
            message: '楼层中文名不能为空',
            trigger: 'blur'
          }]
        },
        {
          type: 'input',
          label: '楼层英文名',
          prop: 'floorEn',
          addDisplay: true,
          editDisabled: false
        },
        {
          type: 'number',
          label: '楼层排序',
          prop: 'sort',
          addDisplay: true,
          editDisabled: false,
          value:1,
          //controlsPosition: 'top',
          precision:0,
          rules:[
            {
              required: true,
              validator:checkeSort,
              trigger: 'blur'
            },
            {
              required: true,
              validator:checkeSort2,
              trigger: 'change'
            }
          ]

        },
        {
          type: 'textarea',
          label: '楼层轮廓',
          prop: 'coordnate',
          addDisplay: true,
          editDisabled: false,
          span:24,
          hide: true,
        },
        {
          type: 'textarea',
          label: '楼层描述',
          prop: 'remark',
          addDisplay: true,
          editDisabled: false,
          span:24
        }
   
      ]
}